Adwaita: restrict button transition
authorLapo Calamandrei <calamandrei@gmail.com>
Thu, 18 Feb 2016 12:24:42 +0000 (13:24 +0100)
committerLapo Calamandrei <calamandrei@gmail.com>
Thu, 18 Feb 2016 12:24:42 +0000 (13:24 +0100)
we use to animate "all" in the transition, this seems to trigger
some weird gtk sizing issue, restricting the transition to just
the needed properties fixes.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index bee962134489d201439b32f5f5234240cd25e244..6e771d4a97b66d4a69a44ee375ab2ba18f850bc0 100644 (file)
@@ -390,8 +390,17 @@ $_dot_color: if($variant=='light', $selected_bg_color,
 }
 
 button {
-  @at-root %button_basic, &{
-    $_button_transition: all 200ms $ease-out-quad;
+  @at-root %button_basic, & {
+    // animating "all" is not needed and also triggers some weird gtk sizing issue so, the transition is restricted
+    // to just the needed properties (see $_button_transition_properties).
+
+    $_button_transition_details: 200ms $ease-out-quad;
+    $_button_transition_properties: background-color, background-image, border-color, box-shadow, text-shadow, -gtk-icon-shadow;
+    $_button_transition:  color $_button_transition_details;
+
+    @each $single_transition in $_button_transition_properties {
+      $_button_transition: $_button_transition, $single_transition $_button_transition_details;
+    }
 
     min-height: 24px;
     min-width: 16px;
index 80df69eba31369fb194d179338b9cdaeb15ed489..567813c4bcb80808b613219dc1555938ff413627 100644 (file)
@@ -349,7 +349,7 @@ notebook > header > tabs > arrow, headerbar button.titlebutton,
   padding: 4px 8px;
   border: 1px solid;
   border-radius: 3px;
-  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+  transition: color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-image 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
   color: #eeeeec;
   outline-color: rgba(238, 238, 236, 0.3);
   border-color: #1c1f1f;
@@ -372,13 +372,13 @@ notebook > header > tabs > arrow, headerbar button.titlebutton,
     .titlebar notebook > header > tabs > arrow.titlebutton:hover,
     .titlebar button.titlebutton:hover, button.flat:hover, notebook > header > tabs > arrow:hover, button.sidebar-button:hover, headerbar button.titlebutton:hover,
     .titlebar button.titlebutton:hover {
-      transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+      transition: color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-image 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
       transition-duration: 500ms; }
       notebook > header > tabs > arrow.flat:hover:active, headerbar notebook > header > tabs > arrow.titlebutton:hover:active, headerbar button.titlebutton:hover:active,
       .titlebar notebook > header > tabs > arrow.titlebutton:hover:active,
       .titlebar button.titlebutton:hover:active, button.flat:hover:active, notebook > header > tabs > arrow:hover:active, button.sidebar-button:hover:active, headerbar button.titlebutton:hover:active,
       .titlebar button.titlebutton:hover:active {
-        transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
+        transition: color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-image 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
   notebook > header > tabs > arrow:hover, headerbar button.titlebutton:hover,
   .titlebar button.titlebutton:hover, button:hover {
     color: #eeeeec;
index 4123518994aa735e0ffd39f784ad7bd868cb8fa4..6f7dea9f26b53b37965e1f793b8d60261c6fd2b6 100644 (file)
@@ -349,7 +349,7 @@ notebook > header > tabs > arrow, headerbar button.titlebutton,
   padding: 4px 8px;
   border: 1px solid;
   border-radius: 3px;
-  transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+  transition: color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-image 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
   color: #2e3436;
   outline-color: rgba(46, 52, 54, 0.3);
   border-color: #9d9d99;
@@ -372,13 +372,13 @@ notebook > header > tabs > arrow, headerbar button.titlebutton,
     .titlebar notebook > header > tabs > arrow.titlebutton:hover,
     .titlebar button.titlebutton:hover, button.flat:hover, notebook > header > tabs > arrow:hover, button.sidebar-button:hover, headerbar button.titlebutton:hover,
     .titlebar button.titlebutton:hover {
-      transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
+      transition: color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-image 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
       transition-duration: 500ms; }
       notebook > header > tabs > arrow.flat:hover:active, headerbar notebook > header > tabs > arrow.titlebutton:hover:active, headerbar button.titlebutton:hover:active,
       .titlebar notebook > header > tabs > arrow.titlebutton:hover:active,
       .titlebar button.titlebutton:hover:active, button.flat:hover:active, notebook > header > tabs > arrow:hover:active, button.sidebar-button:hover:active, headerbar button.titlebutton:hover:active,
       .titlebar button.titlebutton:hover:active {
-        transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
+        transition: color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), background-image 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); }
   notebook > header > tabs > arrow:hover, headerbar button.titlebutton:hover,
   .titlebar button.titlebutton:hover, button:hover {
     color: #2e3436;